package com.landleaf.smarthome.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.io.Serializable;
import java.util.List;

/**
 * When I wrote this, only God and I understood what I was doing
 * Now, God only knows
 * Created by 海航
 * 2020/9/1
 * 功能描述:
 */
@Entity
public class DeviceModel  implements Serializable {
    private static final long serialVersionUID = -850566081892463813L;
    /**
     * deviceSn : 3
     * deviceName : 测试设备3
     * port :
     * sortNo : 3
     * productCode : 5-001
     */
    @Id(autoincrement = true)
    private Long id = null;
    private String deviceSn;
    private String deviceName;
    private int port;//地址位
    private int protocol;
    private int sortNo;
    private Long roomId;
    private int productCode; //设备编码
    private int hvacFlag;//是否是暖通设备
    @Transient
    private List<DeviceAttribute> attrs;//普通的属性键值对列表
    @Transient
    private List<HvacSceneModeListModel> hvacList;//场景中使用的一个特殊的属性





    @Generated(hash = 1200642877)
    public DeviceModel(Long id, String deviceSn, String deviceName, int port,
            int protocol, int sortNo, Long roomId, int productCode, int hvacFlag) {
        this.id = id;
        this.deviceSn = deviceSn;
        this.deviceName = deviceName;
        this.port = port;
        this.protocol = protocol;
        this.sortNo = sortNo;
        this.roomId = roomId;
        this.productCode = productCode;
        this.hvacFlag = hvacFlag;
    }

    @Generated(hash = 210163102)
    public DeviceModel() {
    }





    public List<HvacSceneModeListModel> getHvacList() {
        return hvacList;
    }

    public void setHvacList(List<HvacSceneModeListModel> hvacList) {
        this.hvacList = hvacList;
    }

    public int getProtocol() {
        return protocol;
    }

    public void setProtocol(int protocol) {
        this.protocol = protocol;
    }

    public List<DeviceAttribute> getAtts() {
        return attrs;
    }

    public void setAtts(List<DeviceAttribute> attrs) {
        this.attrs = attrs;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getSortNo() {
        return sortNo;
    }

    public void setSortNo(int sortNo) {
        this.sortNo = sortNo;
    }


    public int getProductCode() {
        return productCode;
    }

    public void setProductCode(int productCode) {
        this.productCode = productCode;
    }

    public List<DeviceAttribute> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<DeviceAttribute> attrs) {
        this.attrs = attrs;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getRoomId() {
        return this.roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public int getHvacFlag() {
        return this.hvacFlag;
    }

    public void setHvacFlag(int hvacFlag) {
        this.hvacFlag = hvacFlag;
    }
}
